package pl.edu.agh.inpema.core.dataBase;

import java.util.List;
import java.util.Set;

import pl.edu.agh.inpema.core.environment.EnvironmentInfo;
import pl.edu.agh.inpema.core.model.AnalyzeResult;
import pl.edu.agh.inpema.core.model.Message;
import pl.edu.agh.inpema.core.model.Profile;

public interface DataBase {
	
	public void setCurrentEnvironmentId(int environmentId);
	
	public int generateNewEnvironmentId(EnvironmentInfo info);
	public void updateEnvironment(EnvironmentInfo info);
	public List<EnvironmentInfo> getAllEnvironmentInfo();
	public EnvironmentInfo getEnvironmentInfo(int environmentId);
	
	public void addReceiver(String receiverName);
	public void addAnalyzer(String analyzerName);
	
	public Integer getProfileId(Profile profile);
	public Integer addProfile(Profile profile);
	public Set<Profile> getAllProfilesForReceiver(String receiverName, int environmentId);
	
	public int addMessage(Message message);
	public Message getMessage(int messageId);
	public Set<Integer> getAllMessagesIdForProfile(int profileId);
	
	public Integer getAnalyzeResultId(String analyzerName, int profileId);
	public Integer addAnalyzeResultId(String analyzerName, int profileId);
	public Set<AnalyzeResult> getAllAnalyzeResults(String analyzerName, int envId);
	
	public List<Object> getResultObject(int resultId, Class objectClass);
	public void addResultObject(String analyzerName, Object resultObject);
	
	public void closeConnection();
}
